3.305 \(\int \frac{(d+e x)^2 (2+x+3 x^2-5 x^3+4 x^4)}{3+2 x+5 x^2} \, dx\)

Optimal. Leaf size=156 \[ \frac{1}{375} x^3 \left (100 d^2-330 d e+81 e^2\right )-\frac{x^2 \left (825 d^2-810 d e-458 e^2\right )}{1250}+\frac{\left (5725 d^2-4405 d e-2554 e^2\right ) \log \left (5 x^2+2 x+3\right )}{15625}+\frac{x \left (2025 d^2+4580 d e-881 e^2\right )}{3125}-\frac{\left (10575 d^2+59890 d e-18323 e^2\right ) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{15625 \sqrt{14}}+\frac{1}{100} e x^4 (40 d-33 e)+\frac{4 e^2 x^5}{25} \]

[Out]

((2025*d^2 + 4580*d*e - 881*e^2)*x)/3125 - ((825*d^2 - 810*d*e - 458*e^2)*x^2)/1250 + ((100*d^2 - 330*d*e + 81
*e^2)*x^3)/375 + ((40*d - 33*e)*e*x^4)/100 + (4*e^2*x^5)/25 - ((10575*d^2 + 59890*d*e - 18323*e^2)*ArcTan[(1 +
 5*x)/Sqrt[14]])/(15625*Sqrt[14]) + ((5725*d^2 - 4405*d*e - 2554*e^2)*Log[3 + 2*x + 5*x^2])/15625

________________________________________________________________________________________

Rubi [A]  time = 0.162131, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {1628, 634, 618, 204, 628} \[ \frac{1}{375} x^3 \left (100 d^2-330 d e+81 e^2\right )-\frac{x^2 \left (825 d^2-810 d e-458 e^2\right )}{1250}+\frac{\left (5725 d^2-4405 d e-2554 e^2\right ) \log \left (5 x^2+2 x+3\right )}{15625}+\frac{x \left (2025 d^2+4580 d e-881 e^2\right )}{3125}-\frac{\left (10575 d^2+59890 d e-18323 e^2\right ) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{15625 \sqrt{14}}+\frac{1}{100} e x^4 (40 d-33 e)+\frac{4 e^2 x^5}{25} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2),x]

[Out]

((2025*d^2 + 4580*d*e - 881*e^2)*x)/3125 - ((825*d^2 - 810*d*e - 458*e^2)*x^2)/1250 + ((100*d^2 - 330*d*e + 81
*e^2)*x^3)/375 + ((40*d - 33*e)*e*x^4)/100 + (4*e^2*x^5)/25 - ((10575*d^2 + 59890*d*e - 18323*e^2)*ArcTan[(1 +
 5*x)/Sqrt[14]])/(15625*Sqrt[14]) + ((5725*d^2 - 4405*d*e - 2554*e^2)*Log[3 + 2*x + 5*x^2])/15625

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (2+x+3 x^2-5 x^3+4 x^4\right )}{3+2 x+5 x^2} \, dx &=\int \left (\frac{2025 d^2+4580 d e-881 e^2}{3125}-\frac{1}{625} \left (825 d^2-810 d e-458 e^2\right ) x+\frac{1}{125} \left (100 d^2-330 d e+81 e^2\right ) x^2+\frac{1}{25} (40 d-33 e) e x^3+\frac{4 e^2 x^4}{5}+\frac{175 d^2-13740 d e+2643 e^2+2 \left (5725 d^2-4405 d e-2554 e^2\right ) x}{3125 \left (3+2 x+5 x^2\right )}\right ) \, dx\\ &=\frac{\left (2025 d^2+4580 d e-881 e^2\right ) x}{3125}-\frac{\left (825 d^2-810 d e-458 e^2\right ) x^2}{1250}+\frac{1}{375} \left (100 d^2-330 d e+81 e^2\right ) x^3+\frac{1}{100} (40 d-33 e) e x^4+\frac{4 e^2 x^5}{25}+\frac{\int \frac{175 d^2-13740 d e+2643 e^2+2 \left (5725 d^2-4405 d e-2554 e^2\right ) x}{3+2 x+5 x^2} \, dx}{3125}\\ &=\frac{\left (2025 d^2+4580 d e-881 e^2\right ) x}{3125}-\frac{\left (825 d^2-810 d e-458 e^2\right ) x^2}{1250}+\frac{1}{375} \left (100 d^2-330 d e+81 e^2\right ) x^3+\frac{1}{100} (40 d-33 e) e x^4+\frac{4 e^2 x^5}{25}+\frac{\left (5725 d^2-4405 d e-2554 e^2\right ) \int \frac{2+10 x}{3+2 x+5 x^2} \, dx}{15625}+\frac{\left (-10575 d^2-59890 d e+18323 e^2\right ) \int \frac{1}{3+2 x+5 x^2} \, dx}{15625}\\ &=\frac{\left (2025 d^2+4580 d e-881 e^2\right ) x}{3125}-\frac{\left (825 d^2-810 d e-458 e^2\right ) x^2}{1250}+\frac{1}{375} \left (100 d^2-330 d e+81 e^2\right ) x^3+\frac{1}{100} (40 d-33 e) e x^4+\frac{4 e^2 x^5}{25}+\frac{\left (5725 d^2-4405 d e-2554 e^2\right ) \log \left (3+2 x+5 x^2\right )}{15625}+\frac{\left (2 \left (10575 d^2+59890 d e-18323 e^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-56-x^2} \, dx,x,2+10 x\right )}{15625}\\ &=\frac{\left (2025 d^2+4580 d e-881 e^2\right ) x}{3125}-\frac{\left (825 d^2-810 d e-458 e^2\right ) x^2}{1250}+\frac{1}{375} \left (100 d^2-330 d e+81 e^2\right ) x^3+\frac{1}{100} (40 d-33 e) e x^4+\frac{4 e^2 x^5}{25}-\frac{\left (10575 d^2+59890 d e-18323 e^2\right ) \tan ^{-1}\left (\frac{1+5 x}{\sqrt{14}}\right )}{15625 \sqrt{14}}+\frac{\left (5725 d^2-4405 d e-2554 e^2\right ) \log \left (3+2 x+5 x^2\right )}{15625}\\ \end{align*}

Mathematica [A]  time = 0.0839269, size = 130, normalized size = 0.83 \[ \frac{35 x \left (50 d^2 \left (200 x^2-495 x+486\right )+60 d e \left (250 x^3-550 x^2+405 x+916\right )+3 e^2 \left (2000 x^4-4125 x^3+2700 x^2+4580 x-3524\right )\right )+84 \left (5725 d^2-4405 d e-2554 e^2\right ) \log \left (5 x^2+2 x+3\right )-6 \sqrt{14} \left (10575 d^2+59890 d e-18323 e^2\right ) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{1312500} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2),x]

[Out]

(35*x*(50*d^2*(486 - 495*x + 200*x^2) + 60*d*e*(916 + 405*x - 550*x^2 + 250*x^3) + 3*e^2*(-3524 + 4580*x + 270
0*x^2 - 4125*x^3 + 2000*x^4)) - 6*Sqrt[14]*(10575*d^2 + 59890*d*e - 18323*e^2)*ArcTan[(1 + 5*x)/Sqrt[14]] + 84
*(5725*d^2 - 4405*d*e - 2554*e^2)*Log[3 + 2*x + 5*x^2])/1312500

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 191, normalized size = 1.2 \begin{align*}{\frac{4\,{e}^{2}{x}^{5}}{25}}+{\frac{2\,{x}^{4}de}{5}}-{\frac{33\,{x}^{4}{e}^{2}}{100}}+{\frac{4\,{x}^{3}{d}^{2}}{15}}-{\frac{22\,{x}^{3}de}{25}}+{\frac{27\,{e}^{2}{x}^{3}}{125}}-{\frac{33\,{x}^{2}{d}^{2}}{50}}+{\frac{81\,{x}^{2}de}{125}}+{\frac{229\,{x}^{2}{e}^{2}}{625}}+{\frac{81\,{d}^{2}x}{125}}+{\frac{916\,xde}{625}}-{\frac{881\,{e}^{2}x}{3125}}+{\frac{229\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ){d}^{2}}{625}}-{\frac{881\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ) de}{3125}}-{\frac{2554\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ){e}^{2}}{15625}}-{\frac{423\,\sqrt{14}{d}^{2}}{8750}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) }-{\frac{5989\,\sqrt{14}de}{21875}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) }+{\frac{18323\,\sqrt{14}{e}^{2}}{218750}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x)

[Out]

4/25*e^2*x^5+2/5*x^4*d*e-33/100*x^4*e^2+4/15*x^3*d^2-22/25*x^3*d*e+27/125*e^2*x^3-33/50*x^2*d^2+81/125*x^2*d*e
+229/625*x^2*e^2+81/125*d^2*x+916/625*x*d*e-881/3125*e^2*x+229/625*ln(5*x^2+2*x+3)*d^2-881/3125*ln(5*x^2+2*x+3
)*d*e-2554/15625*ln(5*x^2+2*x+3)*e^2-423/8750*14^(1/2)*arctan(1/28*(10*x+2)*14^(1/2))*d^2-5989/21875*14^(1/2)*
arctan(1/28*(10*x+2)*14^(1/2))*d*e+18323/218750*14^(1/2)*arctan(1/28*(10*x+2)*14^(1/2))*e^2

________________________________________________________________________________________

Maxima [A]  time = 1.53978, size = 190, normalized size = 1.22 \begin{align*} \frac{4}{25} \, e^{2} x^{5} + \frac{1}{100} \,{\left (40 \, d e - 33 \, e^{2}\right )} x^{4} + \frac{1}{375} \,{\left (100 \, d^{2} - 330 \, d e + 81 \, e^{2}\right )} x^{3} - \frac{1}{1250} \,{\left (825 \, d^{2} - 810 \, d e - 458 \, e^{2}\right )} x^{2} - \frac{1}{218750} \, \sqrt{14}{\left (10575 \, d^{2} + 59890 \, d e - 18323 \, e^{2}\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{1}{3125} \,{\left (2025 \, d^{2} + 4580 \, d e - 881 \, e^{2}\right )} x + \frac{1}{15625} \,{\left (5725 \, d^{2} - 4405 \, d e - 2554 \, e^{2}\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="maxima")

[Out]

4/25*e^2*x^5 + 1/100*(40*d*e - 33*e^2)*x^4 + 1/375*(100*d^2 - 330*d*e + 81*e^2)*x^3 - 1/1250*(825*d^2 - 810*d*
e - 458*e^2)*x^2 - 1/218750*sqrt(14)*(10575*d^2 + 59890*d*e - 18323*e^2)*arctan(1/14*sqrt(14)*(5*x + 1)) + 1/3
125*(2025*d^2 + 4580*d*e - 881*e^2)*x + 1/15625*(5725*d^2 - 4405*d*e - 2554*e^2)*log(5*x^2 + 2*x + 3)

________________________________________________________________________________________

Fricas [A]  time = 1.00717, size = 436, normalized size = 2.79 \begin{align*} \frac{4}{25} \, e^{2} x^{5} + \frac{1}{100} \,{\left (40 \, d e - 33 \, e^{2}\right )} x^{4} + \frac{1}{375} \,{\left (100 \, d^{2} - 330 \, d e + 81 \, e^{2}\right )} x^{3} - \frac{1}{1250} \,{\left (825 \, d^{2} - 810 \, d e - 458 \, e^{2}\right )} x^{2} - \frac{1}{218750} \, \sqrt{14}{\left (10575 \, d^{2} + 59890 \, d e - 18323 \, e^{2}\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{1}{3125} \,{\left (2025 \, d^{2} + 4580 \, d e - 881 \, e^{2}\right )} x + \frac{1}{15625} \,{\left (5725 \, d^{2} - 4405 \, d e - 2554 \, e^{2}\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="fricas")

[Out]

4/25*e^2*x^5 + 1/100*(40*d*e - 33*e^2)*x^4 + 1/375*(100*d^2 - 330*d*e + 81*e^2)*x^3 - 1/1250*(825*d^2 - 810*d*
e - 458*e^2)*x^2 - 1/218750*sqrt(14)*(10575*d^2 + 59890*d*e - 18323*e^2)*arctan(1/14*sqrt(14)*(5*x + 1)) + 1/3
125*(2025*d^2 + 4580*d*e - 881*e^2)*x + 1/15625*(5725*d^2 - 4405*d*e - 2554*e^2)*log(5*x^2 + 2*x + 3)

________________________________________________________________________________________

Sympy [C]  time = 0.998055, size = 303, normalized size = 1.94 \begin{align*} \frac{4 e^{2} x^{5}}{25} + x^{4} \left (\frac{2 d e}{5} - \frac{33 e^{2}}{100}\right ) + x^{3} \left (\frac{4 d^{2}}{15} - \frac{22 d e}{25} + \frac{27 e^{2}}{125}\right ) + x^{2} \left (- \frac{33 d^{2}}{50} + \frac{81 d e}{125} + \frac{229 e^{2}}{625}\right ) + x \left (\frac{81 d^{2}}{125} + \frac{916 d e}{625} - \frac{881 e^{2}}{3125}\right ) + \left (\frac{229 d^{2}}{625} - \frac{881 d e}{3125} - \frac{2554 e^{2}}{15625} - \frac{\sqrt{14} i \left (10575 d^{2} + 59890 d e - 18323 e^{2}\right )}{437500}\right ) \log{\left (x + \frac{2115 d^{2} + 11978 d e - \frac{18323 e^{2}}{5} + \frac{\sqrt{14} i \left (10575 d^{2} + 59890 d e - 18323 e^{2}\right )}{5}}{10575 d^{2} + 59890 d e - 18323 e^{2}} \right )} + \left (\frac{229 d^{2}}{625} - \frac{881 d e}{3125} - \frac{2554 e^{2}}{15625} + \frac{\sqrt{14} i \left (10575 d^{2} + 59890 d e - 18323 e^{2}\right )}{437500}\right ) \log{\left (x + \frac{2115 d^{2} + 11978 d e - \frac{18323 e^{2}}{5} - \frac{\sqrt{14} i \left (10575 d^{2} + 59890 d e - 18323 e^{2}\right )}{5}}{10575 d^{2} + 59890 d e - 18323 e^{2}} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(4*x**4-5*x**3+3*x**2+x+2)/(5*x**2+2*x+3),x)

[Out]

4*e**2*x**5/25 + x**4*(2*d*e/5 - 33*e**2/100) + x**3*(4*d**2/15 - 22*d*e/25 + 27*e**2/125) + x**2*(-33*d**2/50
 + 81*d*e/125 + 229*e**2/625) + x*(81*d**2/125 + 916*d*e/625 - 881*e**2/3125) + (229*d**2/625 - 881*d*e/3125 -
 2554*e**2/15625 - sqrt(14)*I*(10575*d**2 + 59890*d*e - 18323*e**2)/437500)*log(x + (2115*d**2 + 11978*d*e - 1
8323*e**2/5 + sqrt(14)*I*(10575*d**2 + 59890*d*e - 18323*e**2)/5)/(10575*d**2 + 59890*d*e - 18323*e**2)) + (22
9*d**2/625 - 881*d*e/3125 - 2554*e**2/15625 + sqrt(14)*I*(10575*d**2 + 59890*d*e - 18323*e**2)/437500)*log(x +
 (2115*d**2 + 11978*d*e - 18323*e**2/5 - sqrt(14)*I*(10575*d**2 + 59890*d*e - 18323*e**2)/5)/(10575*d**2 + 598
90*d*e - 18323*e**2))

________________________________________________________________________________________

Giac [A]  time = 1.13646, size = 196, normalized size = 1.26 \begin{align*} \frac{4}{25} \, x^{5} e^{2} + \frac{2}{5} \, d x^{4} e + \frac{4}{15} \, d^{2} x^{3} - \frac{33}{100} \, x^{4} e^{2} - \frac{22}{25} \, d x^{3} e - \frac{33}{50} \, d^{2} x^{2} + \frac{27}{125} \, x^{3} e^{2} + \frac{81}{125} \, d x^{2} e + \frac{81}{125} \, d^{2} x + \frac{229}{625} \, x^{2} e^{2} + \frac{916}{625} \, d x e - \frac{1}{218750} \, \sqrt{14}{\left (10575 \, d^{2} + 59890 \, d e - 18323 \, e^{2}\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) - \frac{881}{3125} \, x e^{2} + \frac{1}{15625} \,{\left (5725 \, d^{2} - 4405 \, d e - 2554 \, e^{2}\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="giac")

[Out]

4/25*x^5*e^2 + 2/5*d*x^4*e + 4/15*d^2*x^3 - 33/100*x^4*e^2 - 22/25*d*x^3*e - 33/50*d^2*x^2 + 27/125*x^3*e^2 +
81/125*d*x^2*e + 81/125*d^2*x + 229/625*x^2*e^2 + 916/625*d*x*e - 1/218750*sqrt(14)*(10575*d^2 + 59890*d*e - 1
8323*e^2)*arctan(1/14*sqrt(14)*(5*x + 1)) - 881/3125*x*e^2 + 1/15625*(5725*d^2 - 4405*d*e - 2554*e^2)*log(5*x^
2 + 2*x + 3)